import App from './App'
import { eventBus } from './utils/event-bus.js'
import Loader from './components/loader/loader.vue'
import store from './store'
import languagePlugin, { languageManager } from './utils/language.js'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.component('Loader', Loader)
Vue.component('loader', Loader)
    // 安装语言插件
Vue.use(languagePlugin)
App.mpType = 'app'
const app = new Vue({
        store,
        ...App
    })
    // app.$eventBus = eventBus
app.$mount()
    // #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
    const app = createSSRApp(App)
    app.component('Loader', Loader)
    app.component('loader', Loader)
    app.use(store)
    app.use(languagePlugin)
        // app.config.globalProperties.$eventBus = eventBus
    return {
        app
    }
}
// #endif